/**
 * H5
 */

/**
 * 初始化
 */
const init = () => {
	console.log('【H5平台初始化】 ');
};

/**
 * 登录
 */
const login = (options) => {
	options.login.account = "H5";
	let login = {
		name: app.login.name || '',
		headimg: app.login.headimg || '',
		phone: app.mobile,
		smsCode: app.smsCode,
		appId: app.login.appId || '',
		openId: app.login.openId || '',
		unionId: app.login.unionId || '',
		account: app.login.account || 'UserName'
	}
};

/**
 * 微信登录
 */
const wxLogin = (options) => {
	return new Promise((resolve, reject) => {
		const result = {
			success: false,
			msg: "H5平台不支持微信登录"
		}
		resolve(result);;
		// 	reject(error);
	});
};

export default {
	init,
	login,
	wxLogin
}